<?php

function afficherNews($debut, $fin){
    /*if (!isset ($_SESSION['niveau'])){
        $niveau = 0;

    }else{
        $niveau = $_SESSION['niveau'];
    }*/

    connect();
    $requete = "SELECT News.*, User.pseudo pseudo FROM `News` INNER JOIN User ON User.pseudo = News.auteur ORDER BY `date` DESC LIMIT {$debut}, {$fin}";
    $reponse = executerRequete($requete, $GLOBALS['debug']);

    while ($resultat = mysql_fetch_array($reponse)) {
        require("ajax/news.php") ;
    }
    
    mysql_close();
    
}

?>
